<%@ page language="java"  pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <%--<%
        String path = request.getContextPath();
        String http = request.getScheme();
        String ips = request.getServerName();
        int port = request.getServerPort();

        String basePath = http+"://"+ips+":"+port+path+"/";
    %>
    <base href="<%=basePath%>">--%>
    <title>用户注册</title>
    <style type="text/css">
        body{
            background-image: url("/shop/resources/images/beijing.jpg");
        }
        .box{width: 50%;
            height: 50%;
            margin: 0 auto;
            background-color: black;
            /*定位*/
            position: relative;
            /*透明*/
            filter:opacity(0.9);
            top: 25%;
            border-radius: 5px;
        }
        .register{

            text-align: center;
        }
        h2
        {
            font-family: 幼圆;
            font-size: 40px;
            color:white;
        }
        p{
            font-family: "Wingdings 2";
            color: #8AA2CC;
        }
        /*单独设置input框 type=text的样式*/
        input[type='text']{
            /* 	规定文本块的首行缩进。 */
            text-indent: 10px;
            width: auto;
            border: none;
            /* 设置圆角 */
            border-radius: 10px;
            color: #990099;
        }
        input[type='password']{
            border: none;
            border-radius: 10px;
        }
        input[type='radio']{
            /*圆圈大小*/
            zoom: 100%;
        }
        select{
            height: 26px;
        }
    </style>
</head>
<body>
<div class="box">
    <form action="${pageContext.request.contextPath}/RegisterServlet" method="post">
        <div class="register">
            <h2>
                注册
            </h2>
            <p>
                用户名:<input type="text" name="username" placeholder="请输入用户名" required/>
            </p>
            <p>
                密&emsp;码:<input type="password" name="password" placeholder="请输入密码" required/>
            </p>
            <p>
                手机号:<input type="text" name="phone" placeholder="请输入手机号" required/>
            </p>
            <p>
                年&emsp;龄:<input type="text" name="age"placeholder="请输入年龄" required/>
            </p>
            <p>
                性别:<input type="radio" name="sex" value="0" />男
                <input type="radio" name="sex" value="1" />女
            </p>
            <p>
                <select>
                    角&emsp;色:<option>请选择</option>
                    <option value="2">用户</option>
                    <option value="1">管理员</option>
                </select>
            </P>
            <p>
                <input id="reg" type="submit" value="立即注册"/>
            </p>
            <p style="color: #cc0000">
                ${requestScope.msg}
            </p>
            <p>
                已有账号？<a href="${pageContext.request.contextPath}/ToLoginServlet">请登录</a>
            </p>
        </div>
    </form>
</div>
</body>
</html>
